package com.example.test;

import java.util.Arrays;

/**
 * 策略模式
 * @author Yancey
 * @date 2021/9/25 5:09 下午
 */
public class Main {
    public static void main(String[] args) {
        Cat[] a = {new Cat(6,3),new Cat(2,1),new Cat(3,1)};
        Sorter<Cat> sorter = new Sorter<>();
        sorter.sort(a,new CatComparator());
        System.out.println(Arrays.toString(a));
    }
}
